package com.example.doctor.mapper;

import cn.hutool.core.date.DateTime;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

/**
 * @author sifan
 * @PackagName:com.example.doctor.mapper
 * @ClassName: IndexMapper
 * @Description:
 * @date:2021/1/27 15:23
 */
@Component
public interface IndexMapper {

    @Select("SELECT COUNT(*) AS count FROM order_main WHERE dc_id_bigint=#{dcId} AND system_status_tinyint=2 AND a_type_int=#{aType} AND create_time_datetime>#{dateTime}")
    Integer onLineCount(@Param("dcId") Long dcId, @Param("aType") int aType, @Param("dateTime") DateTime dateTime);

    @Select("SELECT COUNT(*) AS count FROM order_main WHERE dc_id_bigint=#{dcId} AND system_status_tinyint=2 AND a_type_int=#{aType} AND oc_status_tinyint=0 AND create_time_datetime>#{dateTime}")
    Integer toonLineCount(@Param("dcId") Long dcId, @Param("aType") int aType, @Param("dateTime") DateTime dateTime);
}
